//
//  NYSearchHistoryTabSrctionView.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/9.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYSearchHistoryTabSrctionView.h"

@interface NYSearchHistoryTabSrctionView ()

@property (nonatomic, strong) UILabel *nameLabel;
@end

@implementation NYSearchHistoryTabSrctionView

- (instancetype)initWithReuseIdentifier:(nullable NSString *)reuseIdentifier {
        self = [super initWithReuseIdentifier:reuseIdentifier];
        if (self) {
                
                [self initUI];
        }
        return self;
}
- (void)initUI {
        
        self.contentView.backgroundColor = UIColorMakeWithHex(@"#FFFFFF");
        [self.contentView addSubview:self.nameLabel];
        
        [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
                
                make.right.bottom.top.equalTo(self.contentView);
                make.left.mas_equalTo(15);
        }];
}

- (void)setTitle:(NSString *)title {
        _title  = title;
        self.nameLabel.text = title;
}

- (UILabel *)nameLabel {
        if (!_nameLabel) {
                _nameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
                _nameLabel.textColor = UIColorMakeWithHex(@"#999999");
                _nameLabel.font = UIFontMake(13);
        }
        return _nameLabel;
}

@end
